import request from '@/utils/request'

// 更新排班的数据库  updateShift
export function updateShift() {
  return request({
    url: '/teacher/DingTalk/updataShift',
    method: 'get'
  })
}

// 查询钉钉排班对象表列表
export function listScheduling(query) {
  return request({
    url: '/teacher/scheduling/list',
    method: 'get',
    params: query
  })
}
// 根据userId查询考勤组信息
export function getAttendanceGroupByUserId(userId) {
  return request({
    url: '/teacher/DingTalk/getAttendanceGroup/' + userId,
    method: 'get'
  })
}
// 查询排班列表
export function getScheduleList() {
  return request({
    url: '/teacher/scheduling/schedulingList',
    method: 'get',
  })
}


// 新增排班
// export function addScheduling(data) {
//   return request({
//     url: '/teacher/DingTalk/scheduling',
//     method: 'post',
//     data: data
//   })
// }


// 查询钉钉排班对象表详细
export function getScheduling(id) {
  return request({
    url: '/teacher/scheduling/' + id,
    method: 'get'
  })
}

// // 新增钉钉排班对象表
export function addScheduling(data) {
  return request({
    url: '/teacher/scheduling',
    method: 'post',
    data: data
  })
}

// 修改钉钉排班对象表
export function updateScheduling(data) {
  return request({
    url: '/teacher/scheduling',
    method: 'put',
    data: data
  })
}

// 删除钉钉排班对象表
export function delScheduling(id) {
  return request({
    url: '/teacher/scheduling/' + id,
    method: 'delete'
  })
}
